﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Numerics;

namespace jindong
{
    public class Category
    {
        /// <summary>
        /// 分类ID主键
        /// </summary>
        [Key]
        [Required]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int  ID { get; set; }

     
        [Required]
        /// <summary>
        /// 分类名称
        /// </summary>
        public string? Name { get; set; }

       
        [Required]
        /// <summary>
        /// 父类ID
        /// </summary>
        public int Parent_id { get; set; }

        [Required]
        /// <summary>
        /// 是否为父节点
        /// </summary>
        public bool Is_parent { get; set; }

        [Required]
        /// <summary>
        /// 排序权重
        /// </summary>
        public int Sort { get; set; }

        [Required]
        /// <summary>
        /// 分类层级
        /// </summary>
        public int Level { get; set; }
    }
}
